The producer adding an element to the queue will wait for a consumer in another thread.
在队列中加入一个元素的生产者会等待另一个线程的消费者。
While the queue is unbound in size, enabling adds to return immediately, one cannot take an element from the queue until the delay time has expired.
因为队列的大小没有界限,使得添加可以立即返回,但是在延迟时间过去之前,不能从队列中取出元素。
When that consumer is available, the element is passed directly between consumer and producer, never literally getting added to the blocking queue.
当这个消费者出现时,这个元素就直接在消费者和生产者之间传递,永远不会加入到阻塞队列中。
应用推荐